The present invention relates to the field of digital communications and, in particular, to the bi-directional movement of error-free data.
It is common in digital systems to require significant quantities of data to be moved from one location to another. Devices and methods that focus primarily on this task are often referred to as data movers. Computer interfaces like parallel ports, serial ports, and modems are all forms of data movers. Other examples of parts of systems that fall under this umbrella are back-planes, busses and network interfaces.
Many data transmissions are in the form of packets of data, which, in addition to data characters, may include other characters such as cyclic redundancy code (CRC) characters and framing characters. In many cases, to provide an error-free link, each received packet is checked for errors and the status of the packet is reported back to the transmitter. If an error is found the packet is retransmitted. If no confirmation of receipt is received, the packet is retransmitted. For example, if an acknowledge command (ACK) is received by the device in which a packet originated, this indicates that the packet was received correctly; and if a negative acknowledge command (NAK) is received by the device in which a packet originated, this indicates there was an error. Similarly, if no response is received by the device in which a packet originated, this also indicates there was an error.
Assuming a bi-directional flow of data packets, it is desirable to make these status messages and/or status commands coexist with the data packets. Typically, these status messages are packaged in their own packets and transmitted between data packets. In addition, other link-control commands are transmitted this way.
This method of combining data and commands requires trade-offs between link latency (how long before status is expected to be received) and link overhead (how much non-data must be sent).
For example, after an error is discovered at a remote node, the remote node cannot notify the local node until any packet the remote node is sending is complete. This may cause substantial delay due to the fact that long packets are preferred because they improve throughput. The longer the packet, however, the longer the delay.
The present invention concerns a method of transmitting and receiving both data packets and commands as a sequence of characters. These sequences are used to overcome at least some of the above-noted problems. The method includes the steps of transmitting and receiving the contents of a data packet as a sequence of consecutive characters. The method also includes the steps of transmitting and receiving commands as a sequence of consecutive characters. The method may include the step of inserting from zero-to-N commands (N being a positive integer) into the transmission of each data packet, and may further include the step of separating commands and data packets from a received sequence of characters.
In further embodiments, the present invention concerns the definition of a character set used for transmission and reception of data packets and commands. The character set may be composed of characters used to represent all possible data characters. The character set may also be composed of one or more additional characters, the additional characters being distinguishable from all characters used to represent data characters, with these additional characters referred to hereafter as differentiation characters.
In further embodiments, the present invention concerns the definition of one or more commands composed of at least one differentiation character and from zero-to N (N being a positive integer) additional data or differentiation characters. To allow the command to be received, the number of characters in each command may be fixed as part of the definition of the command. Alternatively, the number of characters in the command may be specified by a data character contained within the command. In a preferred embodiment, each command is a single character in length to keep overhead to a minimum.
In further embodiments, the invention concerns the steps of defining the data packets as consisting of from one-to-N (N being a positive integer) data characters. The data packets may also include additional data characters containing validation information based on the contents of the data packet. The data packet may be bounded by at least one differentiation character and from zero-to-N (N being a positive integer) additional data or differentiation characters.
The present invention further includes the process of sequentially transmitting characters of a data packet, the transmission continuing until either all characters of the packet have been sent, or until a command is ready to be sent. When a command is ready, the transmission of data packet characters is suspended at a character boundary, and the sequence of characters comprising the command may be transmitted in its entirety. Following the transmission of the command, transmission of the remaining characters, if any, of the data packet may be resumed.
The present invention also concerns a preferred method for receiving data packets and commands which overcomes at least some of the above-noted problems. The method includes the steps of receiving a sequence of characters, and of separating that sequence into data packets and commands.
In further embodiments, the present invention concerns the further steps of receiving data packet characters until a differentiation character is received. The differentiation character and from zero-to-N (N being a positive integer) additional data or differentiation characters are then decoded to determine the presence of either an embedded command or the end of the data packet. If the differentiation character marks the presence of an embedded command, the command may be extracted from the sequence of received characters and, following this extraction, reception of data packet characters may be enabled. If the differentiation character and from zero-to-N (N being a positive integer) additional data and/or differentiation characters marks the end of the data packet, the data packet may then be completed and the validation characters may then be used to validate the contents of the received data packet.